import request from '@/config/axios'

// 告警通知模板 VO
export interface AlarmNotifyTemplateVO {
  id: number // ID
  name: string // 名称
  content: string // 内容
}

// 告警通知模板 API
export const AlarmNotifyTemplateApi = {
  // 查询告警通知模板分页
  getAlarmNotifyTemplatePage: async (params: any) => {
    return await request.get({ url: `/vmiot/alarm-notify-template/page`, params })
  },

  // 查询告警通知模板详情
  getAlarmNotifyTemplate: async (id: number) => {
    return await request.get({ url: `/vmiot/alarm-notify-template/get?id=` + id })
  },

  // 新增告警通知模板
  createAlarmNotifyTemplate: async (data: AlarmNotifyTemplateVO) => {
    return await request.post({ url: `/vmiot/alarm-notify-template/create`, data })
  },

  // 修改告警通知模板
  updateAlarmNotifyTemplate: async (data: AlarmNotifyTemplateVO) => {
    return await request.put({ url: `/vmiot/alarm-notify-template/update`, data })
  },

  // 删除告警通知模板
  deleteAlarmNotifyTemplate: async (id: number) => {
    return await request.delete({ url: `/vmiot/alarm-notify-template/delete?id=` + id })
  },

  // 导出告警通知模板 Excel
  exportAlarmNotifyTemplate: async (params) => {
    return await request.download({ url: `/vmiot/alarm-notify-template/export-excel`, params })
  }
}